﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Utils
{
    public class NvUtils
    {
        /// <summary>
        /// 当前日期
        /// </summary>
        public string GetDate
        {
            get { return DateTime.Now.Date.ToString("yyyy-MM-dd"); }
        }
        /// <summary>
        /// 当前时间
        /// </summary>
        public string GetTime
        {
            get { return DateTime.Now.ToString("HH:mm:ss"); }
        }
        /// <summary>
        /// 首字母小写
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public string ToTitleLower(string str)
        {
            return StringUtils.ToTitleLower(str);
        }
        /// <summary>
        /// 字段串转小写
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public string ToLower(string str)
        {
            if (string.IsNullOrEmpty(str))
            {
                return str;
            }
            return str.ToLower();
        }
        /// <summary>
        /// 首字母大写
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public string ToTitleCast(string str)
        {
            return StringUtils.ToTitleCase(str);
        }
    }
}
